package com.byb.server.service.mapper;

import com.byb.server.service.dto.ProductDetail;
import com.byb.server.service.dto.ProductDetailScoreDTO;
import org.mapstruct.Mapper;

/**
 * Mapper for the entity ProductDetail and its DTO ProductDetailScoreDTO.
 */
@Mapper(componentModel = "spring", uses = {})
public interface ScoreForProductDetailMapper extends EntityMapper <ProductDetailScoreDTO, ProductDetail> {

    ProductDetailScoreDTO toDto(ProductDetail productDetail);

    default ProductDetailScoreDTO fromId(Long id) {
        if (id == null) {
            return null;
        }
        ProductDetailScoreDTO productDetailScoreDTO = new ProductDetailScoreDTO();
        productDetailScoreDTO.setId(id);
        return productDetailScoreDTO;
    }
}


